<?php
	include "sql.php";
	if(is_array($_POST)&&count($_POST)>0){
		$intime = $outtime = $cost = $carNum = $sName = "";
		if ($_SERVER["REQUEST_METHOD"] == "POST"){
		  $intime = $_POST["intime"];
		  $outtime = $_POST["outtime"];
		  $cost = $_POST["cost"];
		  $carNum = $_POST["carNum"];
		  $sName = $_POST["sName"];
		  if($sName!=null) echo setCost($intime,$outtime,$cost,$carNum,$sName);
		  echo 0;
		  return;
		}
	}
	
?>

<!DOCTYPE html>
<html>
<head>
	<title></title>
</head>
<body>
	<form action="setCost.php" method="post">
		intime:<input type="text" name="intime"><br>
		outtime:<input type="text" name="outtime"><br>
		cost:<input type="text" name="cost"><br>
		carNum:<input type="text" name="carNum"><br>
		station name:<input type="text" name="sName"><br>
		<input type="submit" name="">
	</form>
</body>
</html>

